package org.jsola.hr.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jsola.core.entity.BaseTreeDO;
import org.jsola.core.entity.Key;

import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 用工单位分组
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "hr_child_company")
@Key(UUID = true)
public class ChildCompanyDO extends BaseTreeDO<String> {

    private static final long serialVersionUID = 1L;

    /**
     * 部门名称
     */
    private String name;
    /**
     * 所在地址
     */
    private String address;
    /**
     * 父级ID，一级为0
     */
    private String parentId;
    /**
     * 顺序值，越小越靠前
     */
    private Long sort;
    /**
     * 所属层级，一级为1，二级为2，以此类推
     */
    private Integer level;

    /**
     * 是否拥有权限
     */
    @Transient
    private Boolean hasPermission;

}

